package cn.com.server.mongo.dao;

import java.util.List;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;

public interface MongoDBDao {
    
	String getId(String seq_name);
	
    void save(Object obj);
    
	void insert(Object obj);
    
    <T> T findOne(Class<T> clazz, Query query);
    
    <T> List<T> findAll(Class<T> clazz);
    
    <T> T findById(Class<T> clazz,Object id);
    
    <T> List<T> find(Class<T> clazz, Query query);
    
    <T> List<T> findList(Class<T> clazz,Query query,int currentPage,int pageSize);
    
    <T> long findCount(Class<T> clazz,Query query);
    
    <T> int update(Query query,Update update,Class<T> clazz);

    <T> boolean remove(Object object);
    
    <T> int  remove(Query query, Class<T> clazz);

    
}